package com.cn.wanxi.service.impl;

import com.cn.wanxi.dao.CuisineDao;
import com.cn.wanxi.dao.impl.CuisineImpl;
import com.cn.wanxi.model.CuisineModel;
import com.cn.wanxi.model.ResultModel;
import com.cn.wanxi.service.CuisineService;

public class CuisineServiceImpl implements CuisineService {
    private  CuisineDao cuisineDao=new CuisineImpl();
    @Override
    public ResultModel findAll(CuisineModel model) {
//        CuisineDao cuisineDao=new CuisineImpl();
//        ResultModel resultModel=new ResultModel();
//
//        resultModel.setCode(0);
//        resultModel.setData(cuisineDao.findAll(model));
//        resultModel.setCount(cuisineDao.getCount(model));
//        return resultModel;
        return ResultModel.getInstance(cuisineDao.getCount(model), cuisineDao.findAll(model));
    }

    @Override
    public ResultModel add(CuisineModel cuisineModel) {
        return null;
    }

    @Override
    public ResultModel getCount(CuisineModel cuisineModel) {
        return null;
    }

    @Override
    public ResultModel findById(CuisineModel cuisineModel) {
        return null;
    }

    @Override
    public ResultModel update(CuisineModel cuisineModel) {
        return null;
    }

    @Override
    public ResultModel del(CuisineModel cuisineModel) {
        return null;
    }

    @Override
    public ResultModel enable(CuisineModel cuisineModel) {
        return null;
    }
}
